<?php
include("global_files/global_session.inc");
include("global_files/global_html.inc");
include("global_files/global_pgsql.inc");
include("global_files/global_functions.inc");
include("global_files/global_report.inc");
include("global_files/global_form.inc");


$db=new cDatabase();

$page=new cPage();

$page->title="பயிர் விபரங்கள்";
$page->heading="பயிர் விபரங்களை உள்ளிடல்";
$page->doHeaderHtml();
$page->doCentreHtml();

$form=new cForm();
$report=new cReport();

$form->properties=array("name"=>"payir_details","action"=>"$PHP_SELF","method"=>"POST");
echo $form->startForm();


$crop_array[0]["name"]="நெல்";
$crop_array[0]["id"]="1";
$form->properties=array("name"=>"crop_id","Class"=>"textm");
$form->select_tag_properties=array("default"=>$_POST["crop_id"],"arrays"=>$city_array,"restore_default"=>$_POST["crop_id"]);
$payir_entry_form[0]["என்ன பயிர்?"]=$form->generateSelectTag().$dv->errors["crop_id"];

$land_array[0]["name"]="பரவூர் மேட்டு நிலம்";
$land_array[0]["id"]="1";
$form->properties=array("name"=>"land_id","Class"=>"textm");
$form->select_tag_properties=array("default"=>$_POST["land_id"],"arrays"=>$land_array,"restore_default"=>$_POST["land_id"]);
$payir_entry_form[0]["எந்த நிலம்?"]=$form->generateSelectTag().$dv->errors["land_id"];


$form->properties=array("type"=>"text","class"=>"textm","name"=>"payir_land_size","value"=>"$payir_land_size", "size"=>"10","maxlength"=>"20");
$payir_entry_form[0]["எவ்வளவு நிலத்தில்?"]=$form->generateInputTag();

$form->properties=array("type"=>"text","class"=>"textm","name"=>"sowing_date","value"=>"$sowing_date", "size"=>"10","maxlength"=>"15");
$payir_entry_form[0]["எப்போது விதைப்பு?"]=$form->generateInputTag();

$form->properties=array("type"=>"text","class"=>"textm","name"=>"harvest_date","value"=>"$harvest_date", "size"=>"10","maxlength"=>"15");
$payir_entry_form[0]["எப்போது அறுவடை?"]=$form->generateInputTag();

$form->properties=array("type"=>"text","class"=>"textm","name"=>"harvest_amount","value"=>"$harvest_amount", "size"=>"10","maxlength"=>"15");
$payir_entry_form[0]["எவ்வளவு விளையும்?"]=$form->generateInputTag();


$report->data=$payir_entry_form;
$report->customization["table_style"]="width:30%; border-style:none; border-width:0;";
$report->customization["tr_style"]="border-style:none; border-width:0;";
$report->highlight=false;
echo "<div align=\"center\">";
$report->doVerticalTable();
echo $form->endForm();

$page->doFooterHtml();
?>
